package com.aaa.service;

import com.aaa.entity.Singer;
import com.aaa.mapper.SingerMapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

@Service
public class SingerService {
    @Resource
    SingerMapper singerMapper;
    //查询歌手
    public List<Singer> selectAll(){
    return singerMapper.selectList((Wrapper<Singer>) null) ;
    }
    public List<Singer> select(Integer searchId){
        return singerMapper.selectid(searchId);
    }
    //添加
    public int add(Singer singer){
        return singerMapper.add(singer);
    }
    //修改
    public int update(Singer singer){
        return singerMapper.update(singer);
    }
    //删除
    public int delete(Integer id){
        return singerMapper.deleteById(id);
    }
}
